﻿Shader "Unlit/Invisible"
{
  Properties
  {
    _Invisible("Invisible", Range(0, 1)) = 0
  }
  SubShader
  {
    Tags { "RenderType"="Opaque" }
    LOD 100

    Pass
    {
      CGPROGRAM
      #pragma vertex vert
      #pragma fragment frag

      struct appdata
      {
        float4 vertex : POSITION;
        float2 uv : TEXCOORD0;
      };

      struct v2f
      {
        float2 uv : TEXCOORD0;
        float4 vertex : SV_POSITION;
      };

      fixed _Invisible;

      v2f vert (appdata v)
      {
        v2f o;
        UNITY_INITIALIZE_OUTPUT(appdata, o);
        return o;
      };

      fixed4 frag (v2f i) : SV_Target
      {
        if (_Invisible == 1)
        {
          return float4(0, 0, 0, 0);
        } else
        {
          return float4(0.18, 0.19, 0.19, 1);
        }
      }
      ENDCG
    }
  }
}
